package com.fang.shirotestnoredis.controller;


import com.fang.shirotestnoredis.common.ServerResponse;
import com.fang.shirotestnoredis.service.UserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;



@RestController
@RequestMapping("/test")
public class UserController {

    @Autowired
    private UserService userService;

    //用户登录
    @PostMapping("/login")
    @ApiOperation(value = "用户登录",response = ServerResponse.class,httpMethod = "POST")
    public ServerResponse login(String userId, String paswd){
        return userService.login(userId, paswd);
    }




}
